Conventionally, a rotating electric machine control device that limits a power supply current flowing from a power source to an inverter portion and controls driving of a rotating electric machine has been known. For example, a rotating electric machine control device disclosed in JP-A-2011-125134 restricts heat generation on a power supply path and breakdown of switching elements in an inverter portion by limiting a power supply current. In addition, the rotating electric machine control device disclosed in JP-A-2011-125134 is used as a control device of a rotating electric machine in an electric power steering system in a vehicle to restrict influence of consumption of excess current by the rotating electric machine to other systems in the vehicle.
The rotating electric machine control device disclosed in JP-A-2011-125134 calculates a motor voltage limit command value when limiting the power supply current. The motor voltage limit command value is calculated using a torque constant of the rotating electric machine and a motor resistance. The torque constant and the motor resistance change depending on individual difference of the rotating electric machine and an environmental temperature. Thus, the motor voltage limit command value may have a margin of error. If the motor voltage limit command value has a margin of error, an output of the rotating electric machine may be insufficient due to excess limit of the power supply current or an excess power supply current may flow due to insufficient limitation of the power supply current.